//-----------------------------------------------------------------------
#include "Singleton.h"
//-----------------------------------------------------------------------
Singleton* Singleton::pkInstance = NULL;
//-----------------------------------------------------------------------
Singleton::Singleton()
{
	iNumber = 0;
}
//-----------------------------------------------------------------------
Singleton::~Singleton()
{
}
//-----------------------------------------------------------------------
Singleton* Singleton::getInstance()
{
	if(!pkInstance)
	{
		pkInstance = new Singleton();
	}

	if(pkInstance)
		return pkInstance;	
	else
		std::cout << "Error creating singleton instance" << std::endl;
}
//-----------------------------------------------------------------------
void Singleton::addNumber(int i)
{
	iNumber += i;
}
//-----------------------------------------------------------------------
int Singleton::getNumber()
{
	return iNumber;
}
//-----------------------------------------------------------------------
